//
//  WMCustomButton.h
//  FiveHealth
//
//  Created by Mr.Wang on 2018/8/28.
//  Copyright © 2018年 com.wukangcheng.fivehealths. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
    /**
     *  图片在上
     */
    WMCustomButtonContentModeImageTop,
    /**
     *  图片在左
     */
    WMCustomButtonContentModeImageLeft,
    /**
     *  图片在下
     */
    WMCustomButtonContentModeImageBottom,
    /**
     *  图片在右
     */
    WMCustomButtonContentModeImageRight
}WMButtonContentMode;


typedef enum {
    /**
     *  水平矩形 只考虑图片在左右情况）
     */
    WMCustomButtonTypeHorizontalRectangle,
    /**
     *  垂直矩形（只考虑图片在上下情况）
     */
    WMCustomButtonTypeVerticalRectangle,
    /**
     *  正方形
     */
    WMCustomButtonTypeQuare
}WMButtonType;

@class WMCustomButton;

@protocol WMCustomButtonDelegate <NSObject>

- (void) wmCustomButton:(WMCustomButton *)customButton didClickWithTag:(NSInteger)tag;

@end


@interface WMCustomButton : UIButton


@property (nonatomic, assign) WMButtonType shapeType;

/**
 *  图片位置上左下右
 */
@property (nonatomic, assign) WMButtonContentMode contentMode;




@property (nonatomic, copy) NSString *wmBtnImageName;

@property (nonatomic, copy) NSString *wmBtnTitle;

@property (nonatomic, strong) UIFont *wmBtnTitleFont;

@property (nonatomic, strong) UIColor *wmBtnTitleTextColor;

@property (nonatomic, strong) UIColor *wmBtnTitleLabelBackgroundColor;

@property (nonatomic, weak) id<WMCustomButtonDelegate>delegate;

- (void) updateSubControls;


@end










